﻿using Abp.Configuration.Startup;
using Abp.Localization;
using Abp.Localization.Dictionaries;
using Abp.Localization.Dictionaries.Json;
using System.Reflection;

namespace HCD.Resources.Localization
{
    public static class EntLocalizationConfiguration
    {
        public static void Config(ILocalizationConfiguration configuration,string sourceName)
        {
            configuration.Languages.Add(new LanguageInfo("zh", "简体中文",isDefault:true));
            configuration.Languages.Add(new LanguageInfo("en", "English"));

            configuration.Sources.Add(
            new DictionaryBasedLocalizationSource(
                sourceName,
                new JsonEmbeddedFileLocalizationDictionaryProvider(
                    Assembly.GetExecutingAssembly(),
                    "HCD.Resources.Localization.Json"
                    )
                )
            );
        }
    }
}
